<template>
  <div class="md-swiper-base">
    <el-carousel :height="height">
      <el-carousel-item v-for="(item, index) in swiperData" :key="index">
        <div class="swiper-pic">
          <img :src="item" alt="">
        </div>
      </el-carousel-item>
    </el-carousel>
  </div>
</template>

<script>
export default {
  name: 'MdSwiperBaseComponent',
  props: {
    height: {
      default: 400
    },
    swiperData: {
      type: Array,
      default: () => []
    }
  }
}
</script>

<style lang="scss" scoped>
.md-swiper-base {
  width: 100%;
  box-sizing: border-box;
  height: 100%;
  ::v-deep .el-carousel {
    height: 100%;
  }

  ::v-deep .el-carousel__container {
    height: 100% !important;
  }

  .swiper-pic {
    width: 100%;
    height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    img {
      width: auto !important;
      height: auto !important;
      max-width: 100% !important;
      max-height: 100% !important;
    }
  }
}
</style>